import request from '../utils/request'

export function putPassword(data) {
    return request({
        url: 'user/password',
        method: 'PUT',
        data
    })
}
export function login(data) {
    return request({
        url: 'user/signin',
        method: 'post',
        data
    })
}
export function getUserInfo() {
    return request({
        url: 'user/info',
        method: 'get',
    })
}

export function download(resources_url, type) {
    const data = {
        url: resources_url,
        type
    }
    return request({
        url: 'resource/download',
        method: 'POST',
        data
    })
}
export function getTypes(resources_url) {
    const data = {
        url: resources_url,
    }
    return request({
        url: 'resource/types',
        method: 'POST',
        data
    })
}
export function getResourceSiteList() {
    return request({
        url: 'site/list',
        method: 'GET',
    })
}